<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<title>业务模块-活动室信息</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="format-detection" content="telephone=no">
	<link rel="stylesheet" href="${s.base}/js/layui/css/layui.css" media="all" />
	<link rel="stylesheet" href="${s.base}/css/base/base.css" media="all" /></head>

<body class="childrenBody">
<form class="layui-form">
	<input type="hidden" id="id" name="id" value="${webArea.id}" />
	<div class="layui-form-item layui-row layui-col-xs12">
		<label class="layui-form-label">
			<span class="red">*</span>&nbsp;&nbsp;名称</label>
		<div class="layui-input-block">
			<input type="text" class="layui-input" name="title" value="${webArea.title}" placeholder="请输入名称" lay-verify="required" autocomplete="off" /></div>
	</div>
	<div class="layui-form-item layui-row layui-col-xs12">
		<label class="layui-form-label">
			<span class="red">*</span>&nbsp;&nbsp;级别</label>
		<div class="layui-input-block">
			<select class="form-control" name="areaGrade" lay-verify="required" id="areaGrade"></select>
		</div>
	</div>
	<div class="layui-form-item layui-row layui-col-xs12">
		<label class="layui-form-label">
			<span class="red">*</span>&nbsp;&nbsp;管理人</label>
		<div class="layui-input-block">
			<select class="form-control" name="userId" lay-verify="required" id="userId">
				<#list sysUserList as sysUser>
					<option value="${sysUser.id}" <#if sysUser.id == webArea.userId>selected</#if>>${sysUser.userName}</option>
				</#list>
			</select>
		</div>
	</div>
	<div class="layui-form-item layui-row layui-col-xs12">
		<label class="layui-form-label">
			<span class="red">*</span>&nbsp;&nbsp;地址</label>
		<div class="layui-input-block">
			<input type="text" class="layui-input" name="address" value="${webArea.address}" placeholder="请输入地址" lay-verify="required" autocomplete="off" /></div>
		</div>
	</div>
		<div class="layui-form-item layui-row layui-col-xs12">
			<label class="layui-form-label">
				<span class="red"></span>&nbsp;&nbsp;封面图片</label>
			<div class="layui-input-block">
				<!--单图片开始-->
				<div class="layui-input-block cy-uploadpic-ctn" id="picture"  style=" float:left;margin:10px 0!important;position:relative; width: 90px; height: 90px;">
				</div>
				<!--单图片结束-->
			</div>
		</div>
	<div class="layui-form-item layui-row layui-col-xs12">
		<label class="layui-form-label">
			<span class="red">*</span>&nbsp;&nbsp;联系人</label>
		<div class="layui-input-block">
			<input type="text" class="layui-input" name="linkUser" value="${webArea.linkUser}" placeholder="请输入联系人" lay-verify="required" autocomplete="off" /></div>
	</div>
	<div class="layui-form-item layui-row layui-col-xs12">
		<label class="layui-form-label">
			<span class="red">*</span>&nbsp;&nbsp;联系方式</label>
		<div class="layui-input-block">
			<input type="text" class="layui-input" name="linkPhone" value="${webArea.linkPhone}" placeholder="请输入联系方式" lay-verify="required" autocomplete="off" /></div>
	</div>
	<div class="layui-form-item layui-row layui-col-xs12">
		<label class="layui-form-label">
			<span class="red">*</span>&nbsp;&nbsp;面积</label>
		<div class="layui-input-block">
			<input type="text" class="layui-input" name="areaSize" value="${webArea.areaSize}" placeholder="请输入面积" lay-verify="required" autocomplete="off" /></div>
	</div>
	<div class="layui-form-item layui-row layui-col-xs12">
		<label class="layui-form-label">
			<span class="red">*</span>&nbsp;&nbsp;容量</label>
		<div class="layui-input-block">
			<input type="text" class="layui-input" name="volume" value="${webArea.volume}" placeholder="请输入容量" lay-verify="required" autocomplete="off" /></div>
	</div>
	<div class="layui-form-item layui-row layui-col-xs12">
		<label class="layui-form-label">
			<span class="red">*</span>&nbsp;&nbsp;内容</label>
		<div class="layui-input-block">
			<textarea class="layui-textarea" name="content"  id="content" lay-verify="content" placeholder="请输入内容">${webArea.content}</textarea></div>
	</div>
	<div class="layui-form-item layui-row layui-col-xs12">
		<label class="layui-form-label">
			<span class="red">*</span>&nbsp;&nbsp;状态</label>
		<div class="layui-input-block">
			<select class="form-control" name="status" lay-verify="required" id="status"></select>
		</div>
	</div>
	<div class="layui-form-item layui-row layui-col-xs12">
		<label class="layui-form-label">
			<span class="red">*</span>&nbsp;&nbsp;排序</label>
		<div class="layui-input-block">
			<input type="text" class="layui-input" name="sort" value="${webArea.sort}" placeholder="请输入排序" lay-verify="required" autocomplete="off" /></div>
	</div>
	<div class="layui-form-item layui-row layui-col-xs12">
		<div class="layui-input-block">
			<button class="layui-btn layui-btn-sm" lay-submit="" lay-filter="submitBtn">确定</button>
			<button type="reset" class="layui-btn layui-btn-sm layui-btn-primary cancel">取消</button></div>
	</div>
</form>
<script type="text/javascript" src="${s.base}/js/layui/layui.js"></script>
<script type="text/javascript" src="${s.base}/js/base/base.js"></script>
<script type="text/javascript" src="${s.base}/lib/KnifeZ/ace/ace.js"  charset="utf-8"></script>
<script type="text/javascript">layui.use(['form', 'jquery', 'baseUtil', 'pageUtil','fileUtil','richTxtUtil'],
    function() {
        var form = layui.form,
            $ = layui.jquery,
            baseUtil = layui.baseUtil,
            richTxtUtil = layui.richTxtUtil,
            fileUtil = layui.fileUtil,
            pageUtil = layui.pageUtil;
        //KnifeZ富文本
        var index=richTxtUtil.layeditKnifezBuild("content",300);
        //单图片上传
        fileUtil.uploadImageNoSave('picture',"web/area","${webArea.picture}");
        pageUtil.initDict("base_status,web_area_grade",
            function(dictData) {
                pageUtil.showDict($("#areaGrade"), pageUtil.aceeptDictContentList(dictData, "web_area_grade"), "", '${webArea.areaGrade}');
                pageUtil.showDict($("#status"), pageUtil.aceeptDictContentList(dictData, "base_status"), "", '${webArea.status}');
            });
        form.on('submit(submitBtn)',
            function(data) {
                data.field.content=richTxtUtil.layeditBuildContent(index);
                baseUtil.postMethodResult("/webArea/addOrUpdate", data.field,
                    function(result) {
                        parent.location.reload();
                    });
                return false;
            });
    });</script>
</body>

</html>